<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
	<%@ page import="javax.servlet.http.HttpSession"%>
		<%@ page import="org.hibernate.SessionFactory"%>
<%@ page import="org.hibernate.Session"%>
<%@ page import="java.util.List"%>
<%@ page import="hibernate.model.*"%>
<%@ page import="hibernate.util.HibernateUtil"%>
<%@ page import="hibernate.method.*"%>
<%@ page import="hibernate.method.UserMethods"%>
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> 
<![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang="en"> 
<![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9" lang="en"> <![endif]-->
<!--[if gt IE 8]><!-->
<html class="no-js" lang="en">
<!--<![endif]-->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>HexGames Social</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="templatemo">
<meta charset="UTF-8">

<link
	href='http://fonts.googleapis.com/css?family=Dosis:300,400,500,600,700,800'
	rel='stylesheet' type='text/css'>

<!-- CSS Bootstrap & Custom -->
<link href="../admin/bootstrap/css/bootstrap.css" rel="stylesheet" media="screen">
<link href="../admin/css/font-awesome.min.css" rel="stylesheet" media="screen">
<link rel="stylesheet" href="../admin/css/templatemo_misc.css">
<link rel="stylesheet" href="../admin/css/animate.css">
<link href="../admin/css/templatemo_style.css" rel="stylesheet" media="screen">

<!-- Favicons -->
<link rel="shortcut icon" href="images/ico/favicon.ico">

<!-- JavaScripts -->
<script src="../admin/js/jquery-1.10.2.min.js"></script>
<script src="../admin/js/modernizr.js"></script>
<!--[if lt IE 8]>
	<div style=' clear: both; text-align:center; position: relative;'>
            <a href="http://www.microsoft.com/windows/internet-explorer/default.aspx?ocid=ie6_countdown_bannercode"><img src="http://storage.ie6countdown.com/assets/100/images/banners/warning_bar_0000_us.jpg" border="0" alt="" /></a>
        </div>
    <![endif]-->
</head>

<body>
<%
Integer user_id = (Integer) session.getAttribute("user_id");
response.setContentType("text/html");
SessionFactory sessionFactory = HibernateUtil.getSessionAnnotationFactory();
Session s= sessionFactory.openSession();
s.beginTransaction();
UserMethods um = new UserMethods();
if (user_id == null || "client".equals(um.getUserType(sessionFactory, s, user_id))){
		response.sendRedirect("../social/index.jsp");
	} else
if ("admin".equals(um.getUserType(sessionFactory, s, user_id))){
	

	%>
	<div class="bg-image"></div>
	<div class="overlay-bg"></div>


	<jsp:include page="logPanel.jsp"></jsp:include>

	<jsp:include page="menuMobile.jsp"></jsp:include>

	<div class="main-content">
		<div class="container">
			<div class="row">

				<jsp:include page="menuStatic.jsp"></jsp:include>

				<!-- Begin Content -->
				<div class="col-md-10">

					<jsp:include page="logo.jsp"></jsp:include>


					<div id="menu-container">
					<jsp:include page="container.jsp"></jsp:include>
					</div>
			

				</div>
	
			</div>
			<jsp:include page="footer.jsp"></jsp:include>
		</div>

	</div>
	


	<script src="bootstrap/js/bootstrap.min.js"></script>
	<script src="js/jquery.mixitup.min.js"></script>
	<script src="js/jquery.nicescroll.min.js"></script>
	<script src="js/jquery.lightbox.js"></script>
 <script src="js/templatemo_custom.js"></script>
 	<%}  
 		
 	
	else if ("worker".equals(um.getUserType(sessionFactory, s, user_id))){
		response.sendRedirect("../management/index.jsp");
	}
s.getTransaction().commit();%>
</body>
</html>